<!--
 * @Author: lls 1445622103@qq.com
 * @Date: 2024-04-21 14:19:13
 * @LastEditors: lls 1445622103@qq.com
 * @LastEditTime: 2024-04-21 18:05:56
 * @FilePath: /my-vue-app/src/App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

<template>
  <!-- <van-button type="primary">按钮</van-button> -->
  <!-- <div>{{ mnemonic }}</div> -->
  <!-- <wallet /> -->
  <!-- <tarnsform /> -->
  <!-- <CreateWallet /> -->
  <!-- <RpcLink /> -->
  <!-- <Airdop /> -->
  <!-- <LinkMateMask /> -->
  <LinkMateMaskCopy />
  <!-- <LinkApp /> -->
  <!-- <test /> -->
  <!-- <IPFSStorage /> -->
</template>
<script setup>
import ethers from './components/ethers.vue';
import RpcLink from './components/RpcLink.vue';
import wallet from './components/wallet.vue';
import LinkMateMask from './components/LinkMateMask.vue';
import LinkMateMaskCopy from './components/LinkMateMaskCopy.vue';

import CreateWallet from './components/CreateWallet.vue';
import tarnsform from './components/tarnsform.vue';
import test from './components/test.vue';
import LinkApp from './components/link.vue';
import Airdop from './components/Airdop.vue';
import IPFSStorage from './components/IPFSStorage.vue';
// import * as bip39 from 'bip39';
// import { generateMnemonic } from 'bip39-light';

// import { hdkey } from 'ethereumjs-wallet';
// 生成助记词
// const mnemonic = ref(bip39.generateMnemonic());
const mnemonic = ref(
  'display uncover speak drama sadness output forum pumpkin connect sentence lend indicate'
);

// 生成密钥对
// const wallet = hdkey
//   .fromMasterSeed(bip39.mnemonicToSeed(mnemonic.value))
//   .derivePath("m/44'/60'/0'/0/0")
//   .getWallet();
async function generateKeyPair(mnemonic) {
  // const seed = await bip39.mnemonicToSeed(mnemonic);
  // const hdWallet = hdkey.fromMasterSeed(seed);
  // const keypair = await hdWallet.derivePath("m/44'/60'/0'/0/0");
  // console.log(keypair);
  // console.log(keypair.getWallet());
  // return keypair.getWallet();
}
generateKeyPair(mnemonic.value);
</script>

<style scoped></style>
